
'use strict';

var os = require("os");


function ipv4() {
    var networkInterfaces = os.networkInterfaces();
    for (var networkInterface in networkInterfaces) {
        var networks = networkInterfaces[networkInterface];
        for (var i = 0; i < networks.length; i++) {
            var network = networks[i];
            if (network.family === "IPv4" && !network.internal){
                var address = network.address;

                console.log("ip = %s", address);
            }
        }

    }
}

